package com.rytx.system.domain;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.rytx.common.annotation.Excel;
import com.rytx.common.core.domain.BaseEntity;

/**
 * 地址对象 area_code
 * 
 * @author rytx
 * @date 2024-06-30
 */
@Setter
@Getter
public class AreaCode extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 区划代码 */
    private String code;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 级别1-5,省市县镇村 */
    @Excel(name = "级别1-5,省市县镇村")
    private Integer level;

    /** 父级区划代码 */
    @Excel(name = "父级区划代码")
    private Long pcode;

    /** 城乡分类 */
    @Excel(name = "城乡分类")
    private Long category;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("code", getCode())
            .append("name", getName())
            .append("level", getLevel())
            .append("pcode", getPcode())
            .append("category", getCategory())
            .toString();
    }
}
